package com.manong.service.impl;

import com.manong.entity.Permission;
import com.manong.dao.PermissionMapper;
import com.manong.service.PermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ray
 * @since 2022-06-24
 */
@Service
@Transactional //声明式事务管理
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements PermissionService {
  /**
   * 根据用户ID查询权限列表
   *
   * @param userId
   * @return
   */
  @Override
  public List<Permission> findPermissionListByUserId(Long userId) {
    return baseMapper.findPermissionListByUserId(userId);
  }
  
}
